package com.y2.authprj.bean.auth.model;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.NotNull;


import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.y2.authprj.utils.DateUtil;


public class StaffInfo implements Serializable{

	private static final long serialVersionUID = 7494024221172872293L;

	private int staffId;
	private String staffNum;
	private String chnName;
	private String surName;
	private String pwd;
	private String mobile;
	private int changePwd;
	private int deleteFlag;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	
	private Date createTime;
	private String loginIp;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")

	//默认为国际时间
	private Date loginTime;
	private int logStatus;
	private String ageLimit;//年限
	
	
	
	
	public String getAgeLimit() {
		return ageLimit;
	}


	public void setAgeLimit(String ageLimit) {
		this.ageLimit = ageLimit;
		
	}

	public int getStaffId() {
		return staffId;
	}

	public void setStaffId(int staffId) {
		this.staffId = staffId;
	}


	public String getStaffNum() {
		return staffNum;
	}


	public void setStaffNum(String staffNum) {
		this.staffNum = staffNum;
	}


	public String getChnName() {
		return chnName;
	}


	public void setChnName(String chnName) {
		this.chnName = chnName;
	}


	public String getSurName() {
		return surName;
	}


	public void setSurName(String surName) {
		this.surName = surName;
	}


	public String getPwd() {
		return pwd;
	}


	public void setPwd(String pwd) {
		this.pwd = pwd;
	}


	public String getMobile() {
		return mobile;
	}


	public void setMobile(String mobile) {
		this.mobile = mobile;
	}


	public int getChangePwd() {
		return changePwd;
	}


	public void setChangePwd(int changePwd) {
		this.changePwd = changePwd;
	}


	public int getDeleteFlag() {
		return deleteFlag;
	}


	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}


	public Date getCreateTime() {
		return createTime;
	}


	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	public String getCreateTimeStr(){
		return DateUtil.formate(getCreateTime());
		 
	}
	public String getLoginIp() {
		return loginIp;
	}


	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}


	public Date getLoginTime() {
		return loginTime;
	}


	public void setLoginTime(Date loginTime) {
		this.loginTime = loginTime;
	}
	
	public String getLoginTimeStr(){
		return DateUtil.formate(getLoginTime());
		 
	}

	public int getLogStatus() {
		return logStatus;
	}


	public void setLogStatus(int logStatus) {
		this.logStatus = logStatus;
	}

	@Override
	public String toString() {
		return "StaffInfo [staffId=" + staffId + ", staffNum=" + staffNum + ", chnName=" + chnName + ", surName="
				+ surName + ", pwd=" + pwd + ", mobile=" + mobile + ", changePwd=" + changePwd + ", deleteFlag="
				+ deleteFlag + ", createTime=" + createTime + ", loginIp=" + loginIp + ", loginTime=" + loginTime
				+ ", logStatus=" + logStatus + "]";
	}
	public StaffInfo() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public StaffInfo(int staffId, String staffNum, String chnName, String surName, String pwd, String mobile,
			int changePwd, int deleteFlag, Date createTime, String loginIp, Date loginTime, int logStatus) {
		super();
		this.staffId = staffId;
		this.staffNum = staffNum;
		this.chnName = chnName;
		this.surName = surName;
		this.pwd = pwd;
		this.mobile = mobile;
		this.changePwd = changePwd;
		this.deleteFlag = deleteFlag;
		
		this.createTime = createTime;
		this.loginIp = loginIp;
		this.loginTime = loginTime;
		this.logStatus = logStatus;
	}
	
	public String getCreateDateStr(){
		return DateUtil.formate(getCreateTime());
		 
	}
}
